package com.dark.trident;

import backtype.storm.spout.SpoutOutputCollector;
import backtype.storm.task.TopologyContext;
import backtype.storm.tuple.Fields;
import storm.trident.spout.ITridentSpout;

import java.util.Map;

/**
 * Created by tengxue on 16-6-30.
 */
public class DiagnosisEventSpout implements ITridentSpout<Long> {

    private static final long serialVersionUID=1L;

    SpoutOutputCollector collector;

    BatchCoordinator<Long> coordinator=new DefaultCoordinator();

    Emitter<Long> emitter=new DiagnosisEventEmitter();

    @Override
    public BatchCoordinator<Long> getCoordinator(String s, Map map, TopologyContext topologyContext) {
        return coordinator;
    }

    @Override
    public Emitter<Long> getEmitter(String s, Map map, TopologyContext topologyContext) {
        return emitter;
    }

    @Override
    public Map getComponentConfiguration() {
        return null;
    }

    @Override
    public Fields getOutputFields() {
        return new Fields("event");
    }
}
